1. Field of the Invention
The present invention relates to a recording apparatus which records and reproduces video stream data, which-is defined in MPEG (Moving Picture Experts Group) of a standard of a compressing encoding technology of a digital image and digital audio, onto and from a recording medium.
2. Related Background Art
Currently, satellite digital broadcasting and terrestrial digital broadcasting are becoming widespread in Japan. An MPEG2 transport stream (hereinafter referred to as MPEG2-TS) defined in IEC/ISO 13818 is a data format for transmitting image data and speech data which is mainly adopted in such a digital broadcasting field.
There is an apparatus which receives the transmitted MPEG2-TS and writes MPEG2-TS in, e.g. a disk-shaped recording medium to store MPEG2-TS as a data file while MPEG2-TS is still in the form of a digital signal in which an information quantity is compressed. For example, such the apparatus is disclosed in Japanese Patent Application Laid-Open No. 2000-268537. A user can repeatedly watch the recorded stream data as an AV program at any time by using the apparatus without substantially degrading picture quality and sound quality and further perform random access reproducing having high response.
The MPEG2-TS data format will be schematically described. A data structure of MPEG2-TS is shown in FIGS. 12 and 13. Although the detail MPEG2-TS standard is omitted because the detail MPEG2-TS standard is disclosed in various documents, schematically MPEG2-TS is a stream in which packets having a fixed length of 188 bytes, which is referred to as “TS packet,” are arranged continuously. Like a structural drawing of the TS packet shown in FIG. 12, the TS packet includes a header having the fixed length and an adaptation field and/or a payload portion. As shown in FIG. 13, PES (Packetize Elementary Stream) is arranged while divided into one or a plurality of payload portions of the TS packet. It is assumed that MPEG2-TS is used in application fields such as the broadcasting and communication in which transmission line error is easy to occur. Therefore, in the TS packet, the packet length is set to the fixed length, which packet is easy to handle and whose recovery from the error can be made fast. Up to this point, MPEG2-TS is described.
On the other hand, among the apparatuses using an optical disk such as DVD (Digital Versatile Disc) as the recording medium, some apparatuses performs the recording with MPEG2 program stream (hereinafter referred to as MPEG2-PS) unlike the above MPEG2-TS. A recording and reproducing apparatus which records data in the rewritable optical disk such as DVD-RAM with the MPEG2-PS format is also disclosed. For example, such the apparatus is disclosed in Japanese Patent Application Laid-Open No. 2000-138896.
The MPEG2-TS data format will be schematically described. Although the detail MPEG2-PS standard is omitted because the detail MPEG2-PS standard is disclosed in various documents, schematically MPEG2-PS has a unit of a variable length block referred to as “pack” and MPEG2-PS is the stream in which the packs are arranged continuously. The pack includes a pack header and a plurality of PESs. The PES data included in one pack is formed by gathering pieces of information reproduced by respective constituents within the substantially same time.
In the case where the user performs edit processing on the MPEG2 data file recorded on the disk-shaped recording medium such as the optical disk, the processing such as combining of the files is very troublesome.
For example, in the case of MPEG2-TS, it is necessary to perform alignment adjustment to both a TS packet boundary of 188 bytes which is a data unit of MPEG2-TS and a sector boundary for recognizing the file subjected to the edit processing, on the file system with the data structure satisfying the TS packet boundary and the sector boundary. In the case of MPEG2-PS, it is necessary to perform alignment adjustment to both a pack boundary which is the data unit of MPEG2-PS and sector boundary for recognizing the file subjected to the edit processing, on the file system with the data structure satisfying the pack boundary and the sector boundary.
However, in order to perform the above adjustment, there are following problems. Namely, it is necessary that the file system managing the information on an address or a size of the data recorded in the optical disk is largely updated through many stages of the processing step, load on CPU (Central Processing Unit) controlling the whole processing of the edit device is therefore increased, and thus it takes a long time to perform the processing.